package com.nation.domain;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;

/**
 * Created by dqd on 2017/11/9.
 */
@Entity
@Table(name = "V_important_literature_data", schema = "show_nation", catalog = "")
public class VImportantLiteratureData implements Serializable{
    private String data_type;
    private String nation_z;
    private String country_code;
    private String document;
    private String document_code;
    private String document_source;
    private int document_type;
    private int id;
    private String recoder_id;
    private Date recoderTime;

    @Basic
    @Column(name = "data_type", nullable = false, length = 20)
    public String getData_type() {
        return data_type;
    }

    public void setData_type(String data_type) {
        this.data_type = data_type;
    }

    @Basic
    @Column(name = "nation_z", nullable = false, length = 255)
    public String getNation_z() {
        return nation_z;
    }

    public void setNation_z(String nation_z) {
        this.nation_z = nation_z;
    }

    @Basic
    @Column(name = "country_code", nullable = false, length = 4)
    public String getCountry_code() {
        return country_code;
    }

    public void setCountry_code(String country_code) {
        this.country_code = country_code;
    }

    @Basic
    @Column(name = "document", nullable = false, length = 255)
    public String getDocument() {
        return document;
    }

    public void setDocument(String document) {
        this.document = document;
    }

    @Basic
    @Column(name = "document_code", nullable = false, length = 7)
    public String getDocument_code() {
        return document_code;
    }

    public void setDocument_code(String document_code) {
        this.document_code = document_code;
    }

    @Basic
    @Column(name = "document_source", nullable = false, length = 255)
    public String getDocument_source() {
        return document_source;
    }

    public void setDocument_source(String document_source) {
        this.document_source = document_source;
    }

    @Basic
    @Column(name = "document_type", nullable = false)
    public int getDocument_type() {
        return document_type;
    }

    public void setDocument_type(int document_type) {
        this.document_type = document_type;
    }

    @Basic
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "recoder_id", nullable = false, length = 3)
    public String getRecoder_id() {
        return recoder_id;
    }

    public void setRecoder_id(String recoder_id) {
        this.recoder_id = recoder_id;
    }

    @Basic
    @Column(name = "recoder_time", nullable = false)
    public Date getRecoderTime() {
        return recoderTime;
    }

    public void setRecoderTime(Date recoderTime) {
        this.recoderTime = recoderTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VImportantLiteratureData that = (VImportantLiteratureData) o;

        if (document_type != that.document_type) return false;
        if (id != that.id) return false;
        if (data_type != null ? !data_type.equals(that.data_type) : that.data_type != null) return false;
        if (nation_z != null ? !nation_z.equals(that.nation_z) : that.nation_z != null) return false;
        if (country_code != null ? !country_code.equals(that.country_code) : that.country_code != null) return false;
        if (document != null ? !document.equals(that.document) : that.document != null) return false;
        if (document_code != null ? !document_code.equals(that.document_code) : that.document_code != null)
            return false;
        if (document_source != null ? !document_source.equals(that.document_source) : that.document_source != null)
            return false;
        if (recoder_id != null ? !recoder_id.equals(that.recoder_id) : that.recoder_id != null) return false;
        if (recoderTime != null ? !recoderTime.equals(that.recoderTime) : that.recoderTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = data_type != null ? data_type.hashCode() : 0;
        result = 31 * result + (nation_z != null ? nation_z.hashCode() : 0);
        result = 31 * result + (country_code != null ? country_code.hashCode() : 0);
        result = 31 * result + (document != null ? document.hashCode() : 0);
        result = 31 * result + (document_code != null ? document_code.hashCode() : 0);
        result = 31 * result + (document_source != null ? document_source.hashCode() : 0);
        result = 31 * result + document_type;
        result = 31 * result + id;
        result = 31 * result + (recoder_id != null ? recoder_id.hashCode() : 0);
        result = 31 * result + (recoderTime != null ? recoderTime.hashCode() : 0);
        return result;
    }
}
